import QtQuick 1.1
import com.nokia.meego 1.0

Dialog {

    id: dlgColor
    property string color: ""
    signal selectedColor

    content: Grid {
        id: grColor
        property int r: 40
        anchors.horizontalCenter: parent.horizontalCenter
        columns: 4
        spacing: 5

        Rectangle { color: "white"; radius: grColor.r; width: 100; height: 100; MouseArea{ anchors.fill: parent; onClicked: {dlgColor.color = parent.color; selectedColor(); dlgColor.close() } } }
        Rectangle { color: "gray"; radius: grColor.r; width: 100; height: 100; MouseArea{ anchors.fill: parent; onClicked: {dlgColor.color = parent.color; selectedColor(); dlgColor.close() } } }
        Rectangle { color: "cyan"; radius: grColor.r; width: 100; height: 100; MouseArea{ anchors.fill: parent; onClicked: {dlgColor.color = parent.color; selectedColor(); dlgColor.close() } } }
        Rectangle { color: "darkcyan"; radius: grColor.r; width: 100; height: 100; MouseArea{ anchors.fill: parent; onClicked: {dlgColor.color = parent.color; selectedColor(); dlgColor.close() } } }

        Rectangle { color: "red"; radius: grColor.r; width: 100; height: 100; MouseArea{ anchors.fill: parent; onClicked: {dlgColor.color = parent.color; selectedColor(); dlgColor.close() } } }
        Rectangle { color: "darkred"; radius: grColor.r; width: 100; height: 100; MouseArea{ anchors.fill: parent; onClicked: {dlgColor.color = parent.color; selectedColor(); dlgColor.close() } } }
        Rectangle { color: "magenta"; radius: grColor.r; width: 100; height: 100; MouseArea{ anchors.fill: parent; onClicked: {dlgColor.color = parent.color; selectedColor(); dlgColor.close() } } }
        Rectangle { color: "darkmagenta"; radius: grColor.r; width: 100; height: 100; MouseArea{ anchors.fill: parent; onClicked: {dlgColor.color = parent.color; selectedColor(); dlgColor.close() } } }

        Rectangle { color: "green"; radius: grColor.r; width: 100; height: 100; MouseArea{ anchors.fill: parent; onClicked: {dlgColor.color = parent.color; selectedColor(); dlgColor.close() } } }
        Rectangle { color: "darkgreen"; radius: grColor.r; width: 100; height: 100; MouseArea{ anchors.fill: parent; onClicked: {dlgColor.color = parent.color; selectedColor(); dlgColor.close() } } }
        Rectangle { color: "yellow"; radius: grColor.r; width: 100; height: 100; MouseArea{ anchors.fill: parent; onClicked: {dlgColor.color = parent.color; selectedColor(); dlgColor.close() } } }
        Rectangle { color: "orange"; radius: grColor.r; width: 100; height: 100; MouseArea{ anchors.fill: parent; onClicked: {dlgColor.color = parent.color; selectedColor(); dlgColor.close() } } }

        Rectangle { color: "blue"; radius: grColor.r; width: 100; height: 100; MouseArea{ anchors.fill: parent; onClicked: {dlgColor.color = parent.color; selectedColor(); dlgColor.close() } } }
        Rectangle { color: "steelblue"; radius: grColor.r; width: 100; height: 100; MouseArea{ anchors.fill: parent; onClicked: {dlgColor.color = parent.color; selectedColor(); dlgColor.close() } } }
        Rectangle { color: "brown"; radius: grColor.r; width: 100; height: 100; MouseArea{ anchors.fill: parent; onClicked: {dlgColor.color = parent.color; selectedColor(); dlgColor.close() } } }
        Rectangle { color: "lightgreen"; radius: grColor.r; width: 100; height: 100; MouseArea{ anchors.fill: parent; onClicked: {dlgColor.color = parent.color; selectedColor(); dlgColor.close() } } }

    }
}
